/**
 * 
 */
package com.cmpanyandi.elearning.wordsdriller.activity;

import android.app.ListActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.cmpanyandi.elearning.utils.db.DbAdapter;
import com.cmpanyandi.elearning.wordsdriller.model.Configuration;

/**
 * Abstract list activity class which provides access to DAO.
 * @author wojtek
 *
 */
public abstract class DictionaryActivityList extends ListActivity{

    protected static final int ACTIVITY_CREATE = 0;
    protected static final int ACTIVITY_EDIT = 1;
    protected static final int ADD = Menu.FIRST;
    protected static final int DELETE= Menu.FIRST + 1;
    protected static final int SHOW_ITEMS = Menu.FIRST + 2;
    
    protected TextView mainDescription;
    protected ImageView mainDictionaries;
    protected ImageView mainItemList;
    protected ImageView mainRepetition;
    protected Long pk;
    
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        mainDescription = (TextView) findViewById(R.id.mainDescription);
	mainDictionaries = (ImageView) findViewById(R.id.mainDictionaries);
	mainItemList = (ImageView) findViewById(R.id.mainItemList);
	mainRepetition = (ImageView) findViewById(R.id.mainRepetition);
	
	registeMainDictionaryEvent();
    }
    
    private void registeMainDictionaryEvent() {
	mainDictionaries.setOnClickListener(new View.OnClickListener() {

	    @Override
	    public void onClick(View v) {
		Intent i = new Intent(v.getContext(), DictionaryList.class);
		startActivity(i);

	    }
	});
    }
    
}
